import request from '@/utils/request'
import {
  organizationStatus,
  addOrganization,
} from '@/types/zxy/organizationType'
const organization = {
  // 获取的所有表格的数据
  getOrganizationApi: (data: any) =>
    request.post('/api/getOrganBySearchPage', data),

  //更改机构的启用禁用状态
  changeOganizationStatusApi: (data: organizationStatus) =>
    request.post('/api/updateOrganStatusById', data),

  //新增机构
  addOrganizationApi: (data: addOrganization) => {
    return request.post('/api/saveOrgan', data)
  },
  // 根据id删除机构
  delOrganizationApi: (data: object) => {
    return request.post('/api/delOrganById', data)
  },
  // 编辑机构
  editOrganizationApi: (data: object) => {
    return request.post('/api/updateOrganById', data)
  },
}
export default organization
